Many optimizing compilers, those that perform detailed analysis of the source code and use the information to generate the more efficient machine code, generate an intermediate database representation of the high-level language programs and use this intermediate database representation within their various compilation and optimization processes. At the end of the compilation process, the intermediate database representation is transformed into machine-executable code used by the processors.
Information contained in a compiler-generated intermediate representation can include expression trees, expression directed acyclic graphs (DAGs), symbols, literals, statements, statement chains, pointers to original source code, and a wide range of optimization elements such as basic blocks, loop constructs, dependence information, register allocation information, and pointers to the machine code output. An "expression" is represented as an operator and some number of child expressions. A "tree" shows that every child expression under a root has one (1) parent. A DAG is similar to a tree, including parents and children but with a DAG, a child expression can have any number of parents. Most if not all of the elements for a typical intermediate representation including a detailed discussion of DAGs are contained in a book by Aho, Sethi, and Ullman, Compilers Principles, Techniques and Tools, Addison-Wessley (1986).
This type of detailed and specific information contained in compilergenerated intermediate representation is required in a variety of compiler development and programming tasks. The usual prior method of access to this detailed and specific information has been through the use of simple text dumps. Because text dumps contain all of the information available, they are typically bulky and are cumbersome and time-consuming when utilized. Furthermore, text dumps are complete printouts of the large database constituting the intermediate information. It is not a tool that allows the user to browse through the intermediate information with graphical displays as is realized by the present invention.
Another prior art method of access was developed by the inventor hereof at Lawrence Livermore National Laboratory (LLNL) called DAGTOOL, which is limited to creating expression trees. It was developed on the LLNL Television Monitor Display System, a non-interactive video display system which drew expression DAGs by typing in the expression index. It was not a window based tool, nor was it mouse driven. It read an ASCII dump of the intermediate, not the true intermediate, so neither source, nor other elements of the intermediate were displayed. No known prior art exists that completely displays for evaluation any compiler intermediate language.
In the past, testing and analytical work associated with the development of compilers, optimization techniques, code parallelization and debugging has relied on text dumps and other sources that provide limited and/or undifferentiated information. Sophisticated, visual and flexible tools are required to support such technically acute and exacting development, analysis, and testing activity.